//
//  MAVoIPDelegate.h
//  Pods
//
//  Created by elvisgao on 2019/11/27.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void (^ MAVoIPCompleteBlock)(NSInteger errCode, NSString *errMsg);

typedef void (^ MAVoIPRoomCompleteBlock)(NSInteger errCode, NSString *errMsg, NSArray *openids);

typedef void (^ MAVoIPUserChangedBlock)(NSArray *openids);

@protocol QMAVoIPDelegate <NSObject>

/*
 @abstract  进房
 @param     param：进房参数
            complete:进房成功或失败回调，成功带回房间中现有成员列表
 */
- (void)enterRoom:(NSDictionary *)param
         complete:(MAVoIPRoomCompleteBlock)complete
memberChangedBlock:(MAVoIPUserChangedBlock)memberChangedBlock
speakerChangedBlock:(MAVoIPUserChangedBlock)speakerChangedBlock
   interruptBlock:(MAVoIPCompleteBlock)interruptBlock;

/*
 @abstract  退房
 @param     complete:退房成功或失败回调
 */
- (void)exitRoom:(MAVoIPCompleteBlock)complete;

/*
 @abstract  设置麦克风、扬声器是否静音
 @param     complete:成功或失败回调
 */
- (void)updateMuteConfig:(NSDictionary *)param complete:(MAVoIPCompleteBlock)complete;

/*
 @abstract  是否在房间
 @return    YES 在房间 NO 不在房间
 */
- (BOOL)isInRoom;

@end

NS_ASSUME_NONNULL_END
